package io.dy.converter;

import io.dy.bo.PigBO;
import io.dy.vo.PigVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : dmj
 * @date: 2024/9/3 11:15 上午
 * @description:
 */
@Mapper
public interface PigConverter {

    PigConverter INSTANCE = Mappers.getMapper(PigConverter.class);

    @Mappings(
            @Mapping(target = "mainId", source = "mainId")
    )
    PigBO vo2Bo(PigVO pigVO, Long mainId);

    List<PigVO> vo2BoList(List<PigVO> pigVOList);
}
